package cn.gailvlun.gll.util;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Context;



public class ClipboardUtil {
    public static void copyToClipBoard(Context context, String label, String content) {
        ClipboardManager clipboardManager = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
        ClipData clipData = ClipData.newPlainText(label, content);
        if (clipboardManager != null) {
            clipboardManager.setPrimaryClip(clipData);
        }
    }
}
